<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
  <script>
    var merge = function (nums1, m, nums2, n) {
      nums1.splice(m);
      nums2.splice(n);
      nums1.push(...nums2);
      nums1.sort((a, b) => a - b); //nums1从小到大排列，所以是a-b
    };
  </script>
</html>
